USE [NuevoConsultorioSQL]
GO

/****** Object:  Table [dbo].[nDatosHorarioTurnos]    Script Date: 03/10/2009 21:10:25 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[nDatosHorarioTurnos](
	[codHorarioTurno] [uniqueidentifier] NOT NULL,
	[codHorarioTurnoAnterior] [int] NOT NULL,
	[codHorario] [uniqueidentifier] not NULL,
	[TurnoInicio] [datetime] NULL,
	[TurnoFin] [datetime] NULL,
	[codPaciente] [uniqueidentifier] NULL,
	[codPrestacion] [uniqueidentifier] NULL,
	[ImporteCobrado] [real] NULL,
	[Disponible] [bit] NOT NULL,
	[Confirmado] [bit] NOT NULL,
	[Urgencia] [bit] NOT NULL,
	[Borrado] [bit] NOT NULL,
	[Observacion] [nvarchar](100) NULL,
	[IDResponsable] [uniqueidentifier] NULL,
	[FechaModificado] [datetime] NULL,
	[HoraModificado] [datetime] NULL,	
 CONSTRAINT [PK_nDatosHorarioTurnos] PRIMARY KEY CLUSTERED 
(
	[codHorarioTurno] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT (newid()) FOR [codHorarioTurno]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ((0)) FOR [codHorarioTurnoAnterior]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ('12/30/1899') FOR [TurnoInicio]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ('12/30/1899') FOR [TurnoFin]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ((0)) FOR [ImporteCobrado]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ((1)) FOR [Disponible]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ((0)) FOR [Confirmado]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ((0)) FOR [Urgencia]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT ((0)) FOR [Borrado]
GO

ALTER TABLE [dbo].[nDatosHorarioTurnos] ADD  DEFAULT (' ') FOR [Observacion]
GO


